import { ApiProperty, OmitType, PartialType } from '@nestjs/swagger';

export class BaseRequestMockDto {
  @ApiProperty({
    description: '接口名称',
    example: 'listData',
  })
  pathName: string;

  @ApiProperty({
    description: '响应json',
    example: '{}',
  })
  content: string;
}

export class QueryMockDto extends PartialType(BaseRequestMockDto) {
  @ApiProperty({
    type: 'number',
    default: 10,
    description: '每页数量',
    required: false,
  })
  pageSize?: number;

  @ApiProperty({
    type: 'number',
    default: 1,
    description: '页码',
    required: false,
  })
  pageNum?: number;
}

export class QueryMockListDto extends OmitType(QueryMockDto, ['content']) {}
